package com.weigee.ktv.view.fragment

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import com.linde.library.eventbus.EventSend
import com.linde.library.util.ToastUtil

/**
 * Created by linde on 2017/5/28.
 *<p/>
 */
abstract class BaseFragment : Fragment() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        EventSend.register(this)
    }

    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return ProgressBar(activity)
    }

    override fun onPause() {
        super.onPause()
//        SnackUtil.dismiss()
    }

    override fun onDestroy() {
        super.onDestroy()
        EventSend.unregister(this)
    }
}